#pragma once
#include "ldap_result.h"


class Bind_Result :
	public LDAP_Result
{

	vector<Atribut<char*>> atribute;

	char *User_name;
	char *Password;

	bool AuthState;

public:
	class Bind_Result_Exception
	{
		char *msg;
		int cod;
	public:
		Bind_Result_Exception(char *mesaj,int cod)
		{
			msg=new char[strlen(mesaj)+1];
			if(msg==0)
				throw new exception();
			strcpy(msg,mesaj);
			this->cod=cod;
		}

		char *getMsg()const
		{
			return msg;
		}

		int getCode()const
		{
			return cod;
		}

		~Bind_Result_Exception()
		{
			delete[] msg;
		}
	};

	Bind_Result(char *ras,bool succes,char *user,char *pass);

	~Bind_Result(void);

	void afisareResult();

	bool getAuthState()
	{
		return AuthState;
	}
	
};

